<% content_for(:head) do %>
  <title><%= current_school.name %> | <%= t(".page_title") %> </title>
<% end %>
<div id="schoolrouter-innerpage-data">
  <section class="bg-gray-50">
    <div class="max-w-6xl mx-auto p-4 md:p-10 ">
      <%= link_to standing_school_path, class: "bg-gray-200 px-3 py-1 text-gray-600 rounded-xl text-sm hover:text-primary-500 hover:bg-primary-50 focus:outline-none focus:text-primary-500 focus:bg-primary-50 focus:ring-1 focus:ring-focusColor-500" do %>
        <i class="if i-arrow-left-regular"></i>
        <span><%= t('shared.back_link') %></span>
      <% end %>
      <h1 class="font-bold text-lg pt-5"><%= t("shared.code_of_conduct") %></h1>
      <p class="text-sm text-gray-600"><%= t(".update_code_of_conduct_heading") %></p>
    </div>
  </section>
  <section class="max-w-6xl mx-auto p-4 md:pb-10 md:pl-10 md:pr-10">
    <%= form_with url: code_of_conduct_school_path, method: :patch, local: true do |f| %>
      <div class="mt-1" data-re-component="SimpleMarkdownEditor" data-re-json="<%= { value: @code_of_conduct || "", textAreaName: "code_of_conduct_editor", profile: "Permissive", dynamicHeight: true, maxLength: 20000}.to_json %>"></div>
      <%= f.button t(".save_code_of_conduct"), class: "btn btn-primary btn-large w-full mt-5 max-w-6xl", data: { disable_with: t("shared.saving") } %>
    </section>
  <% end %>
</div>
